<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>控制语句Demo</title>
</head>
<body>
{%  if age>18 %}
    <div>你已经18岁可以进入网吧</div>
    {% elif age==18 %}
    <div>你刚满18岁需要父母陪同</div>
    {% else %}
    <div>未满18岁</div>
{% endif %}
{% for book in books %}
<div>名称:{{ book.name }}   作者:{{ book.author }}</div>
{% endfor %}
</body>
</html>